package com.aw.baselib.widgets;

import android.content.Context;
import android.util.AttributeSet;
import android.view.ViewGroup;

import com.scwang.smartrefresh.layout.SmartRefreshLayout;

/**
 * @author : hzw
 */
public class MySmartRefreshLayout extends SmartRefreshLayout {

    MyRefreshView mHeaderView;

    public MySmartRefreshLayout(Context context) {
        this(context, null);
    }

    public MySmartRefreshLayout(Context context, AttributeSet attrs) {
        super(context, attrs);
        ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
        mHeaderView = new MyRefreshView(context, attrs, 0);
        mHeaderView.setLayoutParams(layoutParams);
        addView(mHeaderView, 0);
    }
}